/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * 生产工单Entity
 *
 * @author HOHD
 * @version 2020-12-19
 */
@Table(name = "st_product_bill_batch_detail", alias = "a", columns = {
        @Column(name = "id", attrName = "id", label = "id", isPK = true),
        @Column(name = "batch_number", attrName = "batchNumber", label = "批号"),
        @Column(name = "small_material_status", attrName = "smallMaterialStatus", label = "小料间状态"),
        @Column(name = "ground_status", attrName = "groundStatus", label = "地磅室状态"),
        @Column(name = "packing_auger_status", attrName = "packingAugerStatus", label = "绞龙状态"),
        @Column(name = "stock_in_status", attrName = "stockInStatus", label = ""),
        @Column(name = "update_date", attrName = "updateDate", label = ""),
        @Column(name = "parent_id", attrName = "parentId.id", label = "父id"),
}, orderBy = "a.id ASC"
)
public class StProductBillBatchDetail extends DataEntity<StProductBillBatchDetail> {

    private static final long serialVersionUID = 1L;
    private String batchNumber;        // 批号
    private Integer smallMaterialStatus;        // 小料间状态
    private Integer groundStatus;        // 地磅室状态
    private Integer packingAugerStatus;        // 绞龙状态
    // update_date 临时用用
    private StProductBill parentId;        // 父id 父类
    private String productId;
    private String specification;
    private Integer caseNumber;
    private String cpIds;
    private String[] cpIdArr;
    private String materialCode;
    private String materialId;
    private Integer stockInStatus;//1 未入库，2 已入库

    private String barCode;//取前端数据用

    private StMaterialRecord materialRecord;

    private String weighPlaceName;
    private String supplierFullName;

    private Date productDate;
    private Integer savedType;
    private StProductRecord productRecord;
    private String formulaCode;

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public StMaterialRecord getMaterialRecord() {
        return materialRecord;
    }

    public void setMaterialRecord(StMaterialRecord materialRecord) {
        this.materialRecord = materialRecord;
    }

    public String getWeighPlaceName() {
        return weighPlaceName;
    }

    public void setWeighPlaceName(String weighPlaceName) {
        this.weighPlaceName = weighPlaceName;
    }

    public String getSupplierFullName() {
        return supplierFullName;
    }

    public void setSupplierFullName(String supplierFullName) {
        this.supplierFullName = supplierFullName;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getProductDate() {
        return productDate;
    }

    public void setProductDate(Date productDate) {
        this.productDate = productDate;
    }

    public Integer getSavedType() {
        return savedType;
    }

    public void setSavedType(Integer savedType) {
        this.savedType = savedType;
    }

    public StProductRecord getProductRecord() {
        return productRecord;
    }

    public void setProductRecord(StProductRecord productRecord) {
        this.productRecord = productRecord;
    }

    public String getFormulaCode() {
        return formulaCode;
    }

    public void setFormulaCode(String formulaCode) {
        this.formulaCode = formulaCode;
    }

    public StProductBillBatchDetail() {
        this(null);
    }


    public StProductBillBatchDetail(StProductBill parentId) {
        this.parentId = parentId;
    }

    public String[] getCpIdArr() {
        return cpIdArr;
    }

    public void setCpIdArr(String[] cpIdArr) {
        this.cpIdArr = cpIdArr;
    }

    public Integer getStockInStatus() {
        return stockInStatus;
    }

    public void setStockInStatus(Integer stockInStatus) {
        this.stockInStatus = stockInStatus;
    }

    public String getMaterialId() {
        return materialId;
    }

    public void setMaterialId(String materialId) {
        this.materialId = materialId;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getCpIds() {
        return cpIds;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public void setCpIds(String cpIds) {
        this.cpIds = cpIds;
    }

    public Integer getCaseNumber() {
        return caseNumber;
    }

    public void setCaseNumber(Integer caseNumber) {
        this.caseNumber = caseNumber;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getBatchNumber() {
        return batchNumber;
    }

    public void setBatchNumber(String batchNumber) {
        this.batchNumber = batchNumber;
    }

    public Integer getSmallMaterialStatus() {
        return smallMaterialStatus;
    }

    public void setSmallMaterialStatus(Integer smallMaterialStatus) {
        this.smallMaterialStatus = smallMaterialStatus;
    }

    public Integer getGroundStatus() {
        return groundStatus;
    }

    public void setGroundStatus(Integer groundStatus) {
        this.groundStatus = groundStatus;
    }

    public Integer getPackingAugerStatus() {
        return packingAugerStatus;
    }

    public void setPackingAugerStatus(Integer packingAugerStatus) {
        this.packingAugerStatus = packingAugerStatus;
    }

    @Length(min = 0, max = 36, message = "父id长度不能超过 36 个字符")
    public StProductBill getParentId() {
        return parentId;
    }

    public void setParentId(StProductBill parentId) {
        this.parentId = parentId;
    }

}